import { Component } from 'react'
import { connect } from 'react-redux'
import { View,Block } from '@tarojs/components'
import { Loading } from '@antmjs/vantui'

import './index.less'

@connect(	state => ({
    flag:state.flag
	})
)
export default class LoadingMe extends Component{
  render(){
    return (
      <Block>
        {/* 加载中占位 */}
        {this.props.flag?
        <View style={{
          position:'fixed',
          left:'0',top:'50%',
          width:'100%',
          zIndex:'2000',
          transform:'translate(0,-50%)',
          display:'flex',
          justifyContent:'center',
          alignItems:'center',
          flexDirection:'column'
        }}
        >
          {/* <View className='traditional' style={{transform: 'translate(-12.5px)'}}></View>
          <View style={{marginTop:'30px',fontSize:'12px'}}>加载中</View> */}
          <Loading color='#1989fa'></Loading>
        </View>
        :null}
      </Block>
    )
  }
}
